package com.winshare.saleAssistant.mapper;

import com.winshare.saleAssistant.domain.dto.req.BaseIdDTO;
import com.winshare.saleAssistant.domain.dto.req.ProductInfoCreateDTO;
import com.winshare.saleAssistant.domain.dto.req.ProductInfoQueryDTO;
import com.winshare.saleAssistant.domain.dto.req.ProductInfoUpdateDTO;
import com.winshare.saleAssistant.domain.dto.resp.ProductInfoRespDTO;
import com.winshare.saleAssistant.domain.entity.ProductInfoDO;
import com.winshare.saleAssistant.domain.query.ProductInfoQuery;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ProductInfoMapStruct {

    ProductInfoMapStruct INSTANCE = Mappers.getMapper(ProductInfoMapStruct.class);

    ProductInfoDO fromProductInfoCreateDTO(ProductInfoCreateDTO productInfoCreateDTO);

    ProductInfoDO fromProductInfoUpdateDTO(ProductInfoUpdateDTO productInfoUpdateDTO);

    ProductInfoDO fromBaseIdDTO(BaseIdDTO baseIdDTO);

    ProductInfoRespDTO fromProductInfoDO(ProductInfoDO productInfoDOInSql);

    ProductInfoQuery fromProductInfoQueryDTO(ProductInfoQueryDTO productInfoQueryDTO);

    List<ProductInfoRespDTO> fromProductInfoDOList(List<ProductInfoDO> productInfoDOList);
}
